Skip to content

add .devcontainer#9

Merged
benjamin-747 merged 2 commits into
libra-tools:mainfrom
genedna:main
Oct 2, 2025
Merged

add .devcontainer#9
benjamin-747 merged 2 commits into
libra-tools:mainfrom
genedna:main

Conversation

@genedna

@genedna genedna commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Quanyi Ma <eli@patch.sh>
@genedna
genedna requested a review from benjamin-747 October 2, 2025 12:11
@genedna genedna self-assigned this Oct 2, 2025
Copilot AI review requested due to automatic review settings October 2, 2025 12:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a development container configuration to the project to provide a consistent development environment. The setup includes Rust toolchain, Buck2 build system, and various development tools in an Ubuntu 24.04 container.

Key changes:

  • Adds Docker-based development environment with Rust and Buck2 tooling
  • Configures VS Code extensions and settings for Rust development
  • Sets up high-resource requirements for development workloads

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
.devcontainer/setup.sh Installation script for development dependencies and toolchain
.devcontainer/devcontainer.json VS Code dev container configuration with extensions and resource requirements
.devcontainer/Dockerfile Docker configuration based on Ubuntu 24.04

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread .devcontainer/setup.sh
@@ -0,0 +1,38 @@
## update and install some things we should probably have

Copilot AI Oct 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shell scripts should start with a shebang line (e.g., #!/bin/bash) to explicitly specify the interpreter.

Copilot uses AI. Check for mistakes.
Comment thread .devcontainer/setup.sh
git lfs install

## Install Buck2
wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst

Copilot AI Oct 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wget command downloads to the current directory (/home/), but the zstd command expects the file to be in /home/. This works correctly, but the path inconsistency could be confusing. Consider using explicit paths or downloading directly to /home/.

Suggested change
wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst
wget -O /home/buck2-x86_64-unknown-linux-gnu.zst https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst

Copilot uses AI. Check for mistakes.
Comment thread .devcontainer/setup.sh
libseccomp-dev

## Install rustup and common components
curl https://sh.rustup.rs -sSf | sh -s -- -y

Copilot AI Oct 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downloading and executing scripts directly from the internet without verification poses a security risk. Consider verifying the script's checksum or using a specific version instead of the latest.

Suggested change
curl https://sh.rustup.rs -sSf | sh -s -- -y
# Download and verify rustup-init (pinned version)
RUSTUP_VERSION=1.26.0
RUSTUP_ARCH=x86_64-unknown-linux-gnu
RUSTUP_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init"
RUSTUP_SHA256_URL="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_ARCH}/rustup-init.sha256"
wget -O /tmp/rustup-init "$RUSTUP_URL"
wget -O /tmp/rustup-init.sha256 "$RUSTUP_SHA256_URL"
cd /tmp
sha256sum -c rustup-init.sha256
if [ $? -ne 0 ]; then
echo "rustup-init checksum verification failed!" >&2
exit 1
fi
chmod +x rustup-init
./rustup-init -y
cd -

Copilot uses AI. Check for mistakes.
Comment thread .devcontainer/setup.sh
git lfs install

## Install Buck2
wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst

Copilot AI Oct 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'latest' for the Buck2 download makes the build non-reproducible. Consider pinning to a specific version for consistency across environments.

Copilot uses AI. Check for mistakes.
Signed-off-by: Quanyi Ma <eli@patch.sh>
@benjamin-747
benjamin-747 merged commit a4128b4 into libra-tools:main Oct 2, 2025
@github-actions github-actions Bot mentioned this pull request Feb 10, 2026
genedna pushed a commit to genedna/git-internal that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants